'\" t
.\"     Title: debmake
.\"    Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.23
.\"      Date: 2024-07-27
.\"    Manual: Debmake Manual
.\"    Source: DEBMAKE
.\"  Language: English
.\"
.TH "DEBMAKE" "1" "2024-07-27" "DEBMAKE" "Debmake Manual"
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.ss \n[.ss] 0
.nh
.ad l
.de URL
\fI\\$2\fP <\\$1>\\$3
..
.als MTO URL
.if \n[.g] \{\
.  mso www.tmac
.  am URL
.    ad l
.  .
.  am MTO
.    ad l
.  .
.  LINKSTYLE blue R < >
.\}
.SH "NAME"
debmake \- program to make a Debian source package
.SH "SYNOPSIS"
.sp
\fBdebmake\fP  [\fB\-h\fP]  [\fB\-c\fP | \fB\-k\fP] [\fB\-n\fP | \fB\-a\fP \fIpackage\-version\fP\fB.orig.tar.gz\fP | \fB\-d\fP | \fB\-t\fP ] [\fB\-p\fP \fIpackage\fP] [\fB\-u\fP \fIversion\fP] [\fB\-r\fP \fIrevision\fP] [\fB\-z\fP \fIextension\fP] [\fB\-b\fP "\fIbinarypackage\fP\fI[:type], ...\fP]" [\fB\-e\fP \fIfoo@example.org\fP] [\fB\-f\fP "\fIfirstname lastname\fP"] [\fB\-i\fP "\fIbuildtool\fP" | \fB\-j\fP] [\fB\-l\fP \fIlicense_file\fP] [\fB\-m\fP] [\fB\-o\fP \fIfile\fP] [\fB\-q\fP] [\fB\-s\fP] [\fB\-v\fP] [\fB\-w\fP "\fIaddon, ...\fP"] [\fB\-x\fP [\fI01234\fP]] [\fB\-y\fP] [\fB\-L\fP] [\fB\-P\fP] [\fB\-T\fP]
.SH "DESCRIPTION"
.sp
\fBdebmake\fP helps to build a Debian package from the upstream source.  Normally, this is done as follows:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
The upstream tarball is downloaded as the \fIpackage\-version\fP\fB.tar.gz\fP file.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
It is untarred to create many files under the \fIpackage\-version/\fP directory.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
debmake is invoked in the \fIpackage\-version/\fP directory, possibly without any arguments.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Files in the \fIpackage\-version\fP\fB/debian/\fP directory are manually adjusted.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBdpkg\-buildpackage\fP (usually from its wrapper \fBdebuild\fP or \fBsbuild\fP) is invoked in the \fIpackage\-version/\fP directory to make Debian packages.
.RE
.sp
Make sure to protect the arguments of the \fB\-b\fP, \fB\-f\fP, \fB\-l\fP, and \fB\-w\fP options from shell interference by quoting them properly.
.SS "optional arguments:"
.sp
\fB\-h\fP, \fB\-\-help\fP
.RS 4
show this help message and exit.
.RE
.sp
\fB\-c\fP, \fB\-\-copyright\fP
.RS 4
scan source for copyright+license text and exit.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fB\-c\fP: simple output style
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fB\-cc\fP: normal output style (similar to the \fBdebian/copyright\fP file)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fB\-ccc\fP: debug output style
.RE
.RE
.sp
\fB\-k\fP, \fB\-\-kludge\fP
.RS 4
compare the \fBdebian/copyright\fP file with the source and exit.
.sp
The \fBdebian/copyright\fP file must be organized to list the generic file patterns before the specific exceptions.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fB\-k\fP: basic output style
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fB\-kk\fP: verbose output style
.RE
.RE
.sp
\fB\-n\fP, \fB\-\-native\fP
.RS 4
make a native Debian source package without \fB.orig.tar.gz\fP.  This makes a \(lq\fB3.0 (native)\fP\(rq format package.
.sp
If you are thinking of packaging a Debian\-specific source tree with \fBdebian/\fP in it into a native Debian package, please think otherwise.  You can use  the \(lq\fBdebmake \-d  \-i debuild\fP\(rq or \(lq\fBdebmake \-t \-i debuild\fP\(rq commands to make a \(lq\fB3.0 (quilt)\fP\(rq format non\-native Debian package.  The only difference is that the \fBdebian/changelog\fP file must use the  non\-native version scheme: \fIversion\-revision\fP.  The non\-native package is more friendly to downstream distributions.
.RE
.sp
\fB\-a\fP \fIpackage\-version\fP\fB.tar.gz\fP, \fB\-\-archive\fP \fIpackage\-version\fP\fB.tar.gz\fP
.RS 4
use the upstream source tarball directly. (\fB\-p\fP, \fB\-u\fP, \fB\-z\fP: overridden)
.sp
The upstream tarball may be specified as \fIpackage_version\fP\fB.orig.tar.gz\fP and \fBtar.gz\fP.  For other cases, it may be \fBtar.bz2\fP, or \fBtar.xz\fP.
.sp
If the specified upstream tarball name contains uppercase letters, the Debian package name is generated by converting them to lowercase letters.
.sp
If the specified argument is the URL (\f(CRhttp://\fP, \f(CRhttps://\fP, or \f(CRftp://\fP) to the upstream tarball, the upstream tarball is downloaded from the URL using \fBwget\fP or \fBcurl\fP.
.RE
.sp
\fB\-d\fP, \fB\-\-dist\fP
.RS 4
run the \(lq\fBmake dist\fP\(rq command equivalents first to generate the upstream tarball and use it.
.sp
The \(lq\fBdebmake \-d\fP\(rq command is designed to run in the \fIpackage/\fP directory hosting the upstream VCS with the build system supporting the \(lq\fBmake dist\fP\(rq command equivalents.  (\f(CRautomake\fP/\f(CRautoconf\fP, ...)
.RE
.sp
\fB\-t\fP, \fB\-\-tar\fP
.RS 4
run the \(lq\fBtar\fP\(rq command to generate the upstream tarball and use it.
.sp
The \(lq\fBdebmake \-t\fP\(rq command is designed to run in the \fIpackage/\fP directory hosting the upstream VCS.  Unless you provide the upstream version with the \fB\-u\fP option or with the \fBdebian/changelog\fP file, a snapshot upstream version is generated in the \fB0\(rs~%y%m%d%H%M\fP format, e.g., \fI0~1403012359\fP, from the UTC date and time.  The generated tarball excludes the \fBdebian/\fP directory found in the upstream VCS. (It also excludes typical VCS directories: \fB.git/\fP, \fB.hg/\fP, \fB.svn/\fP, \fB.CVS/\fP.)
.RE
.sp
\fB\-p\fP \fIpackage\fP, \fB\-\-package\fP \fIpackage\fP
.RS 4
set the Debian package name.
.RE
.sp
\fB\-u\fP \fIversion\fP, \fB\-\-upstreamversion\fP \fIversion\fP
.RS 4
set the upstream package version.
.RE
.sp
\fB\-r\fP \fIrevision\fP, \fB\-\-revision\fP \fIrevision\fP
.RS 4
set the Debian package revision.
.RE
.sp
\fB\-z\fP \fIextension\fP, \fB\-\-targz\fP \fIextension\fP
.RS 4
set the tarball type, \fIextension\fP=(\fBtar.gz\fP|\fBtar.bz2\fP|\fBtar.xz\fP). (alias: \fBz\fP, \fBb\fP, \fBx\fP)
.RE
.sp
\fB\-b\fP "\fIbinarypackage[:type],...\fP", \fB\-\-binaryspec\fP "\fIbinarypackage[:type],...\fP"
.RS 4
set the binary package specs by a comma separated list of \fIbinarypackage:type\fP pairs.  Here, \fIbinarypackage\fP is the binary package name, and the optional \fItype\fP is chosen from the following \fItype\fP values:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBbin\fP: C/C++ compiled ELF binary code package (any, foreign) (default, alias: \fB""\fP, i.e., \fBnull\-string\fP)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBdata\fP: Data (fonts, graphics, ...) package (all, foreign) (alias: \fBda\fP)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBdev\fP: Library development package (any, same) (alias: \fBde\fP)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBdoc\fP: Documentation package (all, foreign) (alias: \fBdo\fP)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBlib\fP: Library package (any, same) (alias: \fBl\fP)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBperl\fP: Perl script package (all, foreign) (alias: \fBpl\fP)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBpython3\fP: Python (version 3) script package (all, foreign) (alias: \fBpy3\fP, \fBpython\fP, \fBpy\fP)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBruby\fP: Ruby script package (all, foreign) (alias: \fBrb\fP)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBnodejs\fP: Node.js based JavaScript package (all, foreign) (alias: \fBjs\fP)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBscript\fP: Shell and other interpreted language script package (all, foreign) (alias: \fBsh\fP)
.RE
.sp
The pair values in the parentheses, such as (any, foreign), are the \fBArchitecture\fP and \fBMulti\-Arch\fP stanza values set in the \fBdebian/control\fP file.  In many cases, the \fBdebmake\fP command makes good guesses for \fItype\fP from \fIbinarypackage\fP.  If \fItype\fP is not obvious, \fItype\fP is set to \fBbin\fP.
.sp
Here are examples for typical binary package split scenarios where the upstream Debian source package name is \fBfoo\fP:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Generating an executable binary package \fBfoo\fP:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\(lq\fB\-b\(cqfoo:bin\*(Aq\fP\(rq, or its short form `\fB\-b\*(Aq\-\*(Aq\fP`", or no \fB\-b\fP option
.RE
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Generating an executable (python3) binary package \fBpython3\-foo\fP:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\(lq\fB\-b\(cqpython3\-foo:py\*(Aq\fP\(rq, or its short form \(lq\fB\-b\(cqpython3\-foo\*(Aq\fP\(rq
.RE
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Generating a data package \fBfoo\fP:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\(lq\fB\-b\(cqfoo:data\*(Aq\fP\(rq, or its short form \(lq\fB\-b\*(Aq\-:data\*(Aq\fP\(rq
.RE
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Generating a executable binary package \fBfoo\fP and a documentation one \fBfoo\-doc\fP:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\(lq\fB\-b\(cqfoo:bin,foo\-doc:doc\*(Aq\fP\(rq, or its short form \(lq\fB\-b\*(Aq\-:\-doc\*(Aq\fP\(rq
.RE
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Generating a executable binary package \fBfoo\fP, a library package \fBlibfoo1\fP, and a library development package \fBlibfoo\-dev\fP:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\(lq\fB\-b\(cqfoo:bin,libfoo1:lib,libfoo\-dev:dev\*(Aq\fP\(rq or its short form \(lq\fB\-b\*(Aq\-,libfoo1,libfoo\-dev\*(Aq\fP\(rq
.RE
.RE
.sp
If the source tree contents do not match settings for \fItype\fP, the \fBdebmake\fP command warns you.
.RE
.sp
\fB\-e\fP \fIfoo@example.org\fP, \fB\-\-email\fP \fIfoo@example.org\fP
.RS 4
set e\-mail address.
.sp
The default is taken from the value of the environment variable \fB$DEBEMAIL\fP.
.RE
.sp
\fB\-f\fP "\fIfirstname lastname\fP", \fB\-\-fullname\fP "\fIfirstname lastname\fP"
.RS 4
set the fullname.
.sp
The default is taken from the value of the environment variable \fB$DEBFULLNAME\fP.
.RE
.sp
\fB\-i\fP "\fIbuildtool\fP", \fB\-\-invoke\fP "\fIbuildtool\fP"
.RS 4
invoke "\fIbuildtool\fP" at the end of execution.  \fIbuildtool\fP may be \(lq\fBdpkg\-buildpackage\fP\(rq, \(lq\fBdebuild\fP\(rq, \(lq\fBsbuild\fP\(rq, etc.
.sp
The default is not to execute any program.
.sp
Setting this option automatically sets the \fB\-\-local\fP option.
.RE
.sp
\fB\-j\fP, \fB\-\-judge\fP
.RS 4
run \fBdpkg\-depcheck\fP to judge build dependencies and identify file paths.  Log files are in the parent directory.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fIpackage\fP\fB.build\-dep.log\fP: Log file for \fBdpkg\-depcheck\fP.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fIpackage\fP\fB.install.log\fP: Log file recording files in the \fBdebian/tmp\fP directory.
.RE
.RE
.sp
\fB\-l\fP "\fIlicense_file,...\fP", \fB\-\-license\fP "\fIlicense_file,...\fP"
.RS 4
add formatted license text to the end of the \fBdebian/copyright\fP file holding license scan results.
.sp
The default is to add \fBCOPYING\fP and \fBLICENSE\fP, and \fIlicense_file\fP needs to list only the additional file names all separated by \(lq\fB,\fP\(rq.
.RE
.sp
\fB\-m\fP, \fB\-\-monoarch\fP
.RS 4
force packages to be non\-multiarch.
.RE
.sp
\fB\-o\fP \fIfile\fP, \fB\-\-option\fP \fIfile\fP
.RS 4
read optional parameters from \fIfile\fP. (This is not for everyday use.)
.sp
The content of \fIfile\fP is sourced as the Python code at the end of \fBpara.py\fP.  For example, the package description can be specified by the following file.
.sp
.if n .RS 4
.nf
.fam C
para[\*(Aqdesc\*(Aq] = \*(Aqprogram short description\*(Aq
para[\*(Aqdesc_long\*(Aq] = \*(Aq\*(Aq\*(Aq\(rs
 program long description which you wish to include.
 .
 Empty line is space + .
 You keep going on ...
\*(Aq\*(Aq\*(Aq
.fam
.fi
.if n .RE
.RE
.sp
\fB\-q\fP, \fB\-\-quitearly\fP
.RS 4
quit early before creating files in the \fBdebian/\fP directory.
.RE
.sp
\fB\-s\fP, \fB\-\-spec\fP
.RS 4
use upstream spec (\fBpyproject.py\fP for Python, etc.) for the package description.
.RE
.sp
\fB\-v\fP, \fB\-\-version\fP
.RS 4
show version information.
.RE
.sp
\fB\-w\fP "\fIaddon,...\fP", \fB\-\-with\fP "\fIaddon,...\fP"
.RS 4
add extra arguments to the \fB\-\-with\fP option of the \fBdh\fP(1) command as \fIaddon\fP in \fBdebian/rules\fP.
.sp
The \fIaddon\fP values are listed all separated by \(lq\fB,\fP\(rq, e.g., \(lq\fB\-w "python3,autoreconf"\fP\(rq.
.sp
For  Autotools based packages, \fBautoreconf\fP as \fIaddon\fP to run \(lq\fBautoreconf \-i \-v \-f\fP\(rq for every package building is default behavior of the \fBdh\fP(1) command.
.sp
For Autotools based packages, if they install Python (version 3) programs, setting \fBpython3\fP as \fIaddon\fP to the \fBdebmake\fP command argument is needed since this is non\-obvious.  But for \fBpyproject.toml\fP based Python packages, setting \fBpython3\fP as \fIaddon\fP to the \fBdebmake\fP command argument is not needed since this is obvious and the \fBdebmake\fP command automatically set it to the \fBdh\fP(1) command.
.RE
.sp
\fB\-x\fP \fIn\fP, \fB\-\-extra\fP \fIn\fP
.RS 4
generate configuration files as templates.  (Please note \fBdebian/changelog\fP, \fBdebian/control\fP, \fBdebian/copyright\fP, and \fBdebian/rules\fP are bare minimum configuration files to build a Debian binary package.)
.sp
The number \fIn\fP determines which configuration templates are generated.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fB\-x0\fP: all required configuration template files. (selected option if any of these files already exist)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fB\-x1\fP: all \fB\-x0\fP files + desirable configuration template files with binary package type supports.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fB\-x2\fP: all \fB\-x1\fP files + normal configuration template files with maintainer script supports.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fB\-x3\fP: all \fB\-x2\fP files + optional configuration template files. (default optuin)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fB\-x4\fP: all \fB\-x3\fP files + deprecated configuration template files.
.RE
.RE
.sp
Some configuration template files are generated with the extra \fB.ex\fP suffix to ease their removal. To activate these, rename their file names to the ones without the \fB.ex\fP suffix and edit their contents.
Existing configuration files are never overwritten.  If you wish to update some of the existing configuration files, please rename them  before  running  the \fBdebmake\fP command and manually merge the generated configuration files with the old renamed ones.
.sp
\fB\-y\fP, \fB\-\-yes\fP
.RS 4
\(lqforce yes\(rq for all prompts. (without option: \(lqask [Y/n]\(rq; doubled option: \(lqforce no\(rq)
.RE
.sp
\fB\-L\fP, \fB\-\-local\fP
.RS 4
generate configuration files for the local package to fool \fBlintian\fP(1) checks.
.RE
.sp
\fB\-P\fP, \fB\-\-pedantic\fP
.RS 4
pedantically check auto\-generated files.
.RE
.sp
\fB\-T\fP, \fB\-\-tutorial\fP
.RS 4
output tutorial comment lines in template files.  default when \fB\-x3\fP or \fB\-x4\fP is set.
.RE
.SH "EXAMPLES"
.sp
For a well behaving source, you can build a good\-for\-local\-use installable single Debian binary package easily with one command.  Test install of such a package generated in this way offers a good alternative to the traditional \(lq\fBmake install\fP\(rq command installing into the \fB/usr/local\fP directory since the Debian package can be  removed  cleanly  by  the \(lq\fBdpkg \-P\fP \*(Aq...\*(Aq\(rq command. Here are some examples of how to build such test packages. (These should work in most cases.  If the \fB\-d\fP option does not work, try the \fB\-t\fP option instead.)
.sp
For a typical C program source tree packaged with \fBautoconf\fP/\fBautomake\fP:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBdebmake \-d \-i debuild\fP
.RE
.sp
For a typical Python (version 3) module source tree:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBdebmake \-s \-d \-b":python3" \-i debuild\fP
.RE
.sp
For a typical Python (version 3) module in the \fIpackage\-version\fP\fB.tar.gz\fP archive:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBdebmake \-s \-a\fP \fIpackage\-version\fP\fB.tar.gz \-b":python3" \-i debuild\fP
.RE
.sp
For a typical Perl module in the \fIpackage\-version\fP\fB.tar.gz\fP archive:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBdebmake \-a\fP \fIpackage\-version\fP\fB.tar.gz \-b":perl" \-i debuild\fP
.RE
.SH "HELPER PACKAGES"
.sp
Packaging may require installation of some additional specialty helper packages.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Python (version 3) programs may require the \fBpybuild\-plugin\-pyproject\fP package.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
The Autotools (\fBautoconf\fP + \fBautomake\fP) build system may require \fBautotools\-dev\fP or \fBdh\-autoreconf\fP package.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Ruby programs may require the \fBgem2deb\fP package.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Node.js based JavaScript programs may require the \fBpkg\-js\-tools\fP package.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Java programs may require the \fBjavahelper\fP package.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Gnome programs may require the \fBgobject\-introspection\fP package.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
etc.
.RE
.SH "CAVEAT"
.sp
Although \fBdebmake\fP is meant to provide template files for the package maintainer to work on, actual packaging activities are often performed without using \fBdebmake\fP while referencing only existing similar packages and \(lq\c
.URL "https://www.debian.org/doc/debian\-policy/" "Debian Policy Manual" "\(rq."
All template files generated by \fBdebmake\fP are required to be modified manually.
.sp
There are 2 positive points for \fBdebmake\fP:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBdebmake\fP helps to write terse packaging tutorial \(lq\c
.URL "https://www.debian.org/doc/manuals/debmake\-doc/" "Guide for Debian Maintainers" "\(rq"
(\fBdebmake\-doc\fP package).
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBdebmake\fP provides short extracted license texts as \fBdebian/copyright\fP in decent accuracy to help license review.
.RE
.sp
For license review, it is highly recommended to use other tools such as \fBlicensecheck\fP from the \fBlicensecheck\fP package.
.sp
There are some limitations for what characters may be used as a part of the Debian package.  The most notable limitation is the prohibition of uppercase letters in the package name.  Here is a summary as a set of regular expressions:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Upstream package name (\fB\-p\fP): \f(CR[\-+.a\-z0\-9]{2,}\fP
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Binary package name (\fB\-b\fP): \f(CR[\-+.a\-z0\-9]{2,}\fP
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Upstream version (\fB\-u\fP): \f(CR[0\-9][\-+.:~a\-z0\-9A\-Z]*\fP
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
Debian revision (\fB\-r\fP): \f(CR[0\-9][+.~a\-z0\-9A\-Z]*\fP
.RE
.sp
See the exact definition in \(lq\c
.URL "https://www.debian.org/doc/debian\-policy/#document\-ch\-controlfields" "Chapter 5 \- Control files and their fields" "\(rq"
in the \(lqDebian Policy Manual\(rq.
.sp
\fBdebmake\fP assumes relatively simple packaging cases.  So all programs related to the interpreter are assumed to be \(lq\fBArchitecture: all\fP\(rq.  This is not always true.
.SH "DEBUG"
.sp
Please report bugs to the \fBdebmake\fP package using the \fBreportbug\fP command.
.sp
The character set in the environment variable \fB$DEBUG\fP determines the logging output level.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBi\fP: \f(CRmain.py\fP logging
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBp\fP: \f(CRpara.py\fP logging
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBs\fP: \f(CRcheckdep5.py\fP \f(CRcheck_format_style()\fP logging
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBy\fP: \f(CRcheckdep5.py\fP \f(CRsplit_years_name()\fP logging
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBb\fP: \f(CRcheckdep5.py\fP \f(CRparse_lines()\fP 1 logging \(em content_state scan loop: begin\-loop
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBm\fP: \f(CRcheckdep5.py\fP \f(CRparse_lines()\fP 2 logging \(em content_state scan loop: after regex match
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBe\fP: \f(CRcheckdep5.py\fP \f(CRparse_lines()\fP 3 logging \(em content_state scan loop: end\-loop
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBa\fP: \f(CRcheckdep5.py\fP \f(CRparse_lines()\fP 4 logging \(em print author/translator section text
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBf\fP: \f(CRcheckdep5.py\fP \f(CRcheck_all_license()\fP 1 logging \(em input filename for the copyright scan
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBl\fP: \f(CRcheckdep5.py\fP \f(CRcheck_all_license()\fP 2 logging \(em print license section text
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBc\fP: \f(CRcheckdep5.py\fP \f(CRcheck_all_license()\fP 3 logging \(em print copyright section text
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBk\fP: \f(CRcheckdep5.py\fP \f(CRcheck_all_license()\fP 4 logging \(em sort key for debian/copyright stanza
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBr\fP: \f(CRsed.py\fP logging
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBw\fP: \f(CRcat.py\fP logging
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.  sp -1
.  IP \(bu 2.3
.\}
\fBn\fP: \f(CRkludge.py\fP logging (\(lq\fBdebmake \-k\fP\(rq)
.RE
.sp
Use this feature as:
.sp
.if n .RS 4
.nf
.fam C
 $ DEBUG=ipsybmeaflckrwn debmake ...
.fam
.fi
.if n .RE
.sp
See \fBREADME.developer\fP in the source for more.
.SH "AUTHOR"
.sp
Copyright © 2014\-2024 Osamu Aoki \c
.MTO "osamu\(atdebian.org" "" ""
.SH "LICENSE"
.sp
Expat License
.SH "SEE ALSO"
.sp
The \fBdebmake\-doc\fP package provides the \(lq\c
.URL "https://www.debian.org/doc/manuals/debmake\-doc/" "Guide for Debian Maintainers" "\(rq"
in plain text, HTML and PDF formats under the \fB/usr/share/doc/debmake\-doc/\fP directory.
.sp
See also \fBdpkg\-source\fP(1), \fBdeb\-control\fP(5), \fBdebhelper\fP(7), \fBdh\fP(1), \fBdpkg\-buildpackage\fP(1), \fBdebuild\fP(1), \fBquilt\fP(1), \fBdpkg\-depcheck\fP(1), \fBsbuild\fP(1), \fBgbp\-buildpackage\fP(1), and \fBgbp\-pq\fP(1) manpages.